package com.wk.code.wkserver.controller.app;

import com.wk.code.wkserver.entity.SysBanner;
import com.wk.code.wkserver.response.result.R;
import com.wk.code.wkserver.service.ISysBannerService;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wq
 * @version 1.0
 * @date 2021/06/15 14:44
 */
@RestController
@RequestMapping("/banner")
@AllArgsConstructor
@Api(tags = "app-前台广告管理")
public class BannerController {

    private final ISysBannerService sysBannerService;

    /**
     * 广告列表
     *
     * @return R
     */
    @GetMapping("/list")
    public R<List<SysBanner>> list() {
        return R.success(sysBannerService.list());
    }


    /**
     * 获取列表
     *
     * @return R
     */
    @GetMapping("/acquire")
    public R<List<SysBanner>> acquire() {
        return R.success(sysBannerService.list());
    }


}
